# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: kevin <kevin@archlinux.org>
# Contributor: K. Piche <kpiche@rogers.com>

pkgname=perl-file-basedir
_realname=File-BaseDir
pkgver=0.07
pkgrel=3
pkgdesc='Use the Freedesktop.org base directory specification'
arch=('any')
license=('GPL' 'PerlArtistic')
url="http://search.cpan.org/dist/${_realname}/"
depends=('perl-ipc-system-simple')
makedepends=('perl-module-build>0.4205')
checkdepends=('perl-test-pod' 'perl-test-pod-coverage' 'perl-file-which' 'xdg-user-dirs')
options=('!emptydirs')
source=("http://search.cpan.org/CPAN/authors/id/K/KI/KIMRYAN/${_realname}-$pkgver.tar.gz")
md5sums=('5d10401970d209049c8491d2906c3e13')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  mkdir .config
  cd "${srcdir}/${_realname}-${pkgver}"
  HOME="$srcdir" make test
}

package() {
  cd ${srcdir}/${_realname}-${pkgver}
  make install DESTDIR=${pkgdir}
}
